package com.lhnstart.learn.bases.innerclass;

import com.sun.org.apache.xpath.internal.operations.Or;

/**
 * 成员内部类
 *
 * @author lhn
 * @date 2023/07/18 20:03
 * @since 1.0.0
 **/
public class MemberInnerClass01 {

    public static void main(String[] args) {
        Outer06 inner06 = new Outer06();
        inner06.t1();
        Outer06.Inner06 inner061 = inner06.to();
        inner061.say();
        Outer06.Inner06 inner062 = inner06.new Inner06();
    }

}

class Outer06{
    private int n1 = 10;
    public String name = "张三";

    // 成员内部类
     class Inner06{
        public void say() {
            System.out.println(n1 + "123" + name);
        }
    }

    public void t1() {
        Inner06 inner06 = new Inner06();
        inner06.say();
    }

    public Inner06 to() {
        return new Inner06();
    }
}